package org.jeecg.modules.engineering.mapper;

import java.util.List;

import com.baomidou.mybatisplus.annotation.SqlParser;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.engineering.entity.EquipCollectTrigger;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

/**
 * @Description: 设备采集触发事件规则表
 * @Author: jeecg-boot
 * @Date:   2019-08-20
 * @Version: V1.0
 */
@Repository
public interface EquipCollectTriggerMapper extends BaseMapper<EquipCollectTrigger> {

	boolean deleteByMainId(String mainId);
    
	List<EquipCollectTrigger> selectByMainId(String mainId);

	@SqlParser(filter = true)
    List<EquipCollectTrigger> selectAll();

	@SqlParser(filter = true)
	List<EquipCollectTrigger> selectByItem(@Param("itemId")String itemId);

	@SqlParser(filter = true)
    long selectCountByEventIds(@Param("ids")List<String> ids, @Param("size")int size);
}
